<!-- start: Container -->
<div class="container">
    <!-- start: Page Title Icon-->
    <div id="page-title-icon"></div>
    <div id="page-title-icon-inner">
        <i class="ico-google-maps ico-white"></i>
    </div>
    <!-- end: Page Title Icon-->
    <!-- start: Page Title -->
    <section id="page-title">
        <h2>Đăng nhập</span></h2>
        <h6></h6>
    </section>
</div>
<div id="wrapper" class="white-wrapper">
    <!-- end: Container  -->
    <!-- start: Container -->
    <div class="container">

        <!-- start: Contact Form -->
        <div class="sixteen columns">

            <div class="form-spacer"></div>

            <!-- Success Message -->
            <div class="success-message">

                <div class="notification success closeable">
                    <p><span>Success!</span> Your message has been sent.</p>
                </div>
            </div>


            <!-- start: Contact Form -->
            <div id="contact-form">
                <form method="post" name="loginForm" class="require-validate ajax-form-login" action="<?php echo $this->url ("login", array('controller' => 'login', 'action' => 'login'))?>" enctype="multipart/form-data">
                    <div class="field">
                        <label>Email: <span>*</span></label>
                        <input type="text" name="username" class="text" />
                    </div>

                    <div class="field">
                        <label>Mật khẩu: <span>*</span></label>
                        <input type="password" name="password" class="text" />
                    </div>
                    <div class="field">
                        <input type="submit" id="send" value="Login"/>
                        <span style="float: left;margin-top: 15px"><small>Quên mật khẩu <a href="/user/forgotpassword">Click vao đây</a> </small></span>
                        <div class="loading"></div>
                    </div>
                  </form>
            </div>
        </div>
        <!-- end: Contact Form -->

    </div>
    <!-- end: Contact Form -->

</div>
<!-- end: Container -->
</div>
<script>
    $(document).ready(function(){
        $.ajax({
            url: 'login/islogin',
            type: 'POST',
            data:'' ,
            dataType: 'html',
            success: function (response){
                response = JSON.parse (response);
                if(response.result){
                    jsuccess(response.message);
                    setTimeout(window.location.href='http://'+window.location.host,2000);
                }
            }
        })  ;
    })  ;
</script>